<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<!-- saved from url=(0044)http://localhost:8080/HouseRent/page/add.jsp -->
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>云和租房 -发布房屋信息</title>
<meta content="text/html; charset=utf-8" http-equiv=content-type><link 
rel=stylesheet type=text/css href="../css/style.css">
<meta name=generator content="mshtml 8.00.7601.17514"></head>
<body>
<div id=header class=wrap>
<div id=logo><img src="../images/logo.gif"></div></div>
<div id=reglogin class=wrap>
<div class=dialog>
<dl class=clearfix>
  <dt>新房屋信息发布</dt>
  <dd class=past>填写房屋信息</dd></dl>
<div class=box>
<form id=add_action method=post name=add
 action="upActionUpdate.action" enctype="multipart/form-data">
<div class=infos>
<table class=field>
  <tbody>
  <tr>
    <td class=field>标　　题：</td>
    <td><input id=add_action_title class=text type="text" value="${house.title}" name="title"> </td></tr>
  <tr>
    <td class=field>户　　型：</td>
    <td><select class=text name="type_id">
    <option selected value="${house.type_id.tname}">${house.type_id.tname}</option>
        
    <option 
        value="一室一厅">一室一厅</option>
        <option 
        value="二室一厅">二室一厅</option>
        <option 
        value="三室一厅">三室一厅</option>
        
        </select></td></tr>
  <tr>
    <td class=field>面　　积：</td>
    <td><input id=add_action_floorage class=text type=text 
name="floorage" value="${house.floorAge}"></td></tr>
  <tr>
    <td class=field>价　　格：</td>
    <td><input id=add_action_price class=text type=text name="price" value="${house.price}"> </td></tr>
  <tr>
    <td class=field>房产证日期：</td>
    <td><input class=text type=text name="pubdate" value="${house.pubdate}"></td></tr>
  <tr>
    <td class=field>位　　置：</td>
    <td>区：<select class=text name=district_id id="district" onchange="cascade1()">
    <option selected>${house.street_id.district_id.dname}</option>
    
    <option 
        value="海淀区">海淀区</option><option  
        value="开发区">开发区</option></select> 
        街：<select class=text name="street_id" id="jie"> 
        
        
        <option selected>${house.street_id.sname}</option>
        
        
        
        </select> </td></tr><!-- 
						<tr>
							<td class="field">坐  标：</td>
							<td><input type="text" class="text" name="point" />
							</td>
						</tr>
						--><!--  <tr>
							<td class="field">y 坐  标：</td>
							<td><input type="text" class="text" name="point.y" /></td>
						</tr>-->
  <tr>
    <td class=field>联系方式：</td>
    <td><input id=add_action_contact class=text type=text name="contact" value="${house.contact}"> </td></tr>
  <tr>
  <tr>
    <td class=field>图片详情：</td>
    <td><input id="add_action_pic" type="file" name="upload" value="${house.pic}"> </td></tr>
  <tr>
  
    <td class=field>详细信息：</td>
    <td><textarea name="description">${house.description}</textarea></td></tr></tbody></table>
   <input name="id" value="${house.id}" type="hidden">
<div class=buttons><input type="submit" value="立即修改"> 
</div></div></form></div></div></div>
<div id=footer class=wrap>
<dl>
  <dt>云和租房 © 2010 云和 京icp证1000001号</dt>
  <dd>关于我们 · 联系方式 · 意见反馈 · 帮助中心</dd></dl></div>
  
  </body>
  <script type="text/javascript" src="../jquery/jquery-1.8.3.js"></script>
 <script>
   
 function $(obj){
		return document.getElementById(obj);
	}
	 function cascade1(){
	  var hb = new Array("东海淀区","西海淀区","北海淀区","南海淀区");
	  var hn = new Array("东开发区","西开发区","北开发区","南开发区");

	   var province = $("district").value;
	 		
	   $("jie").options.length = 0;	
	          if(province=="海淀区"){
	 			for(var i=0; i< hb.length; i++){
	 				var opt = document.createElement("option");
	 			    opt.setAttribute("value",hb[i]);
	 				opt.innerHTML = hb[i];
	 				$("jie").appendChild(opt);
				
	 			}
	 		}
	         if(province == "开发区"){
	 			for(var i=0; i<hn.length; i++){
	 				var opt = document.createElement("option");
	 				opt.setAttribute("value",hn[i]);
	 				opt.innerHTML = hn[i];
	 				$("jie").appendChild(opt);
 			}
	 		}
            if(province=="请选择您所在的区"){
            	var opt = document.createElement("option");
            	opt.setAttribute("value","请选择您所在的大街---");
            	opt.innerHTML ="请选择您所在的大街---";
            	$("jie").appendChild(opt);
            }

	 }
	
	
	   
  


</script>
  
  
  </html>
